package cn.edu.sdjzu.xg.kcsj.domain;

import cn.edu.sdjzu.xg.kcsj.security.User;

import java.io.Serializable;

public class Activity implements Comparable<Activity>, Serializable {
    private int id;
    private String description;
    private String introduction;
    private int participantsNum;
    private java.sql.Date startTime;
    private java.sql.Date endTime;
    private User user1;
    private User user2;
    private int available_id;

    public Activity() {

    }

    public Activity(int id, String description, String introduction, int participantsNum, java.sql.Date startTime, java.sql.Date endTime, User user1, User user2, int available_id) {
        this.id=id;
        this.description=description;
        this.introduction=introduction;
        this.participantsNum=participantsNum;
        this.startTime=startTime;
        this.endTime=endTime;
        this.user1=user1;
        this.user2=user2;
        this.available_id=available_id;
    }

    public Activity(String description, String introduction, int participantsNum, java.sql.Date startTime, java.sql.Date endTime, User user1, User user2, int available_id) {
        this.description=description;
        this.introduction=introduction;
        this.participantsNum=participantsNum;
        this.startTime=startTime;
        this.endTime=endTime;
        this.user1=user1;
        this.user2=user2;
        this.available_id=available_id;
    }

    @Override
    public String toString() {
        return "Activity{" +
                "id=" + id +
                ", description='" + description + '\'' +
                ", introduction='" + introduction + '\'' +
                ", participantsNum'" + participantsNum + '\'' +
                ", startTime=" + startTime + '\'' +
                ", endTime=" + endTime + '\'' +
                ", teacher=" + user1 + '\'' +
                ", leader=" + user2 + '\'' +
                ", available_id=" + available_id +
                '}';
    }
    @Override
    public int compareTo(Activity o) {
        return (int) (o.id-this.id);
    }
    public int getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public int getParticipantsNum() {
        return participantsNum;
    }

    public void setId(int participantsNum) {
        this.participantsNum = participantsNum;
    }

    public java.sql.Date getStartTime() {
        return startTime;
    }

    public void setStartTime(java.sql.Date startTime) {
        this.startTime = startTime;
    }

    public java.sql.Date getEndTime() {
        return endTime;
    }

    public void setEndTime(java.sql.Date endTime) {
        this.endTime = endTime;
    }

    public User getUser1() {
        return user1;
    }

    public void setUser1(User user1) {
        this.user1 = user1;
    }

    public User getUser2() {
        return user2;
    }

    public void setUser2(User user2) {
        this.user2 = user2;
    }

    public int getAvailable_id() {
        return available_id;
    }

    public void setAvailable_id(int available_id) {
        this.available_id = available_id;
    }
}
